<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Nutriware</title>
    <link rel="stylesheet" href="<?php echo $this->webroot; ?>css/reset.css" />
    <link rel="stylesheet" href="<?php echo $this->webroot; ?>css/jquery-ui.custom.css" />
    <link rel="stylesheet" href="<?php echo $this->webroot; ?>css/text.css" />
    <link rel="stylesheet" href="<?php echo $this->webroot; ?>css/style.css" />
    <link rel="stylesheet" href="<?php echo $this->webroot; ?>css/jquery.calculator.css" />
    <link rel="stylesheet" href="<?php echo $this->webroot; ?>css/jquery.wysiwyg.css" />
    <link rel="stylesheet" href="<?php echo $this->webroot; ?>css/ui.jqgrid.css" />
    <link rel="stylesheet" href="<?php echo $this->webroot; ?>css/jquery.cleditor.css" />
    <link rel="stylesheet" href="<?php echo $this->webroot; ?>css/jquery.ui.timepicker.css" />

    <style type="text/css">
        #ui-datepicker-div
        {
            z-index: 999999999;
        }
    </style>

    <script>
        var webRoot = "<?php echo $this->webroot; ?>";
    </script>

    <script src="<?php echo $this->webroot; ?>js/jquery-1.4.4.min.js"></script>
    <script src="<?php echo $this->webroot; ?>js/jquery-ui-1.8.9.custom.min.js"></script>
    <script src="<?php echo $this->webroot; ?>js/ajaxfileupload.js"></script>
    <script src="<?php echo $this->webroot; ?>js/jquery.joverlay.pack.js"></script>
    <script src="<?php echo $this->webroot; ?>js/date.js"></script>
    <script src="<?php echo $this->webroot; ?>js/validaciones.js"></script>
    <script src="<?php echo $this->webroot; ?>js/antropometria.js"></script>
    <script src="<?php echo $this->webroot; ?>js/model.js"></script>
    <script src="<?php echo $this->webroot; ?>js/jwysiwyg-0.5/jquery.wysiwyg.js"></script>
    <script src="<?php echo $this->webroot; ?>js/tiny_mce/tiny_mce.js"></script>
    <script src="<?php echo $this->webroot; ?>js/jquery.calculator.js"></script>
    <script src="<?php echo $this->webroot; ?>js/jquery.calculator-es.js"></script>
    <script src="<?php echo $this->webroot; ?>js/grid.locale-es.js"></script>
    <script src="<?php echo $this->webroot; ?>js/jquery.jqGrid.min.js"></script>
    <script src="<?php echo $this->webroot; ?>js/jquery.cleditor.js"></script>
    <script src="<?php echo $this->webroot; ?>js/consejos.js"></script>
    <script src="<?php echo $this->webroot; ?>js/jquery.ui.timepicker.js"></script>
    
    <script>
        var webRoot = "<?php echo $this->webroot; ?>";
    </script>
    <script>
        var onReadyListeners = new Array();

        var addOnReady = function(func){
            onReadyListeners[onReadyListeners.length] = func;
        }

        $(document).ready(function(){
            initConsejos();
            $("#input_calculator").calculator(
                {
                    showOn: 'both',
                    buttonImage: '<?php echo $this->webroot; ?>img/calculator.png',
                    layout: $.calculator.scientificLayout,
                    buttonImageOnly: true,
                    useThemeRoller: true,
                    onOpen: function() {
                        $("#input_calculator").css("visibility", "visible");
                        $("#input_calculator").css("position", "relative");
                        $("#input_calculator").css("top", "-5px");
                        $("#input_calculator").focus();
                    },
                    onClose: function() {
                        $("#input_calculator").css("visibility", "hidden");
                    }
                }
            );
            $("#input_calculator").css("visibility", "hidden");
            for(var i=0; i<onReadyListeners.length; i++){
                onReadyListeners[i]();
            }

        });
    </script>
</head>
<body>
<?php echo $this->element('header'); ?>
<div class="back"></div>
<div class="content" id="content">
    <div style="display:none;" id="div_backup"><?php 
        if($this->Session->check('backup')){
            echo $this->element("../home/backup");
        }
        ?>
    </div>
    <?php echo $content_for_layout; ?>
</div>
<div class="background"></div>
<?php echo $this->element('footer'); ?>
</body>
</html>